// ChartWatcherMixin.js
import { nanoid } from 'nanoid'
import { activeName } from '@/utils/modules/settings.js'

export default {
  data() {
    return {
      key_01: `key${nanoid()}`,
      key_02: `key${nanoid()}`,
      key_03: `key${nanoid()}`,
      activeName
    }
  },
  methods: {
    copyLastGroups() {
      const { number } = this.allValues[this.allValues.length - 1]
      const items = this.groupMap[this.groupsKey].find((arr) => arr.includes(Number(number)))
      navigator.clipboard.writeText(`[
        ${items.join(',')}
      ]`)
    }
  }
}
